home *** CD-ROM | disk | FTP | other *** search
- //
- // CITSlider include
- //
- // StormC
- //
- // version 2002.03.09
- //
-
- #ifndef CIT_SLIDER_H
- #define CIT_SLIDER_H TRUE
-
- #include <gadgets/slider.h>
-
- #ifndef CIT_GADGETS_H
- #include "CITGadget.h"
- #endif
-
- //
- // This enum for internal use only
- //
- enum
- {
- CITSLIDER_MIN,
- CITSLIDER_MAX,
- CITSLIDER_LEVEL,
- CITSLIDER_ORIENTATION,
- CITSLIDER_DISPHOOK,
- CITSLIDER_TICKS,
- CITSLIDER_SHORTTICKS,
- CITSLIDER_TICKSIZE,
- CITSLIDER_KNOBIMAGE,
- CITSLIDER_BODYFILL,
- CITSLIDER_BODYIMAGE,
- CITSLIDER_GRADIENT,
- CITSLIDER_PENARRAY,
- CITSLIDER_INVERT,
- CITSLIDER_KNOBDELTA,
- CITSLIDER_LAST
- };
-
- class CITSlider:public CITGadget
- {
- public:
- CITSlider();
- ~CITSlider();
-
- void Min(WORD min)
- {setTag(CITSLIDER_MIN,SLIDER_Min,min);}
- void Max(WORD max)
- {setTag(CITSLIDER_MAX,SLIDER_Max,max);}
- void Level(WORD level)
- {setTag(CITSLIDER_LEVEL,SLIDER_Level,level);}
- void Orientation(WORD orien)
- {setTag(CITSLIDER_ORIENTATION,SLIDER_Orientation,orien);}
- void Ticks(LONG ticks)
- {setTag(CITSLIDER_TICKS,SLIDER_Ticks,ticks);}
- void ShortTicks(BOOL b = TRUE)
- {setTag(CITSLIDER_SHORTTICKS,SLIDER_ShortTicks,b);}
- void TickSize(WORD tSize)
- {setTag(CITSLIDER_TICKSIZE,SLIDER_TickSize,tSize);}
- void KnobImage(struct Image* im)
- {setTag(CITSLIDER_KNOBIMAGE,SLIDER_KnobImage,ULONG(im));}
- void BodyFill(WORD bFill)
- {setTag(CITSLIDER_BODYFILL,SLIDER_BodyFill,bFill);}
- void BodyImage(struct Image* im)
- {setTag(CITSLIDER_BODYIMAGE,SLIDER_BodyImage,ULONG(im));}
- void Gradient(BOOL b = TRUE)
- {setTag(CITSLIDER_GRADIENT,SLIDER_Gradient,b);}
- void PenArray(UWORD pen)
- {setTag(CITSLIDER_PENARRAY,SLIDER_PenArray,pen);}
- void Invert(BOOL b = TRUE)
- {setTag(CITSLIDER_INVERT,SLIDER_Invert,b);}
- void KnobDelta(WORD kDelta)
- {setTag(CITSLIDER_KNOBDELTA,SLIDER_KnobDelta,kDelta);}
-
- WORD Level();
-
- protected:
- virtual Object* NewObjectA(TagItem* tags);
- virtual void hookSetup(ULONG userData);
-
- private:
- void setTag(int index,ULONG attr,ULONG val);
-
- TagItem* sliderTag;
- };
-
- #endif
-